#include<stdio.h>
int main()
{
    unsigned long long n;
    while(~scanf("%llu",&n))
    {
        if(n==0)
        {
            printf("0\n");
        }
        else
        {
            printf("%llu\n",2*n-1);
        }
        
    }
    return 0;
}